class Solution(object):
    def rotateString(self, s, goal):
        """
        :type s: str
        :type goal: str
        :rtype: bool
        """
        n1 = len(s)
        n2 = len(goal)
        if n1 != n2:
            return False
        for i in range(n1):
            if s[i:] + s[:i] == goal:
                return True
        return False